//
// Created by zhp on 2025/7/17.
//

#ifndef DEMOSYNTAXC_ANIMAL_H
#define DEMOSYNTAXC_ANIMAL_H

# include <iostream>

class Animal {
public:
    virtual void sound() const {
        std::cout << "animal sound";
    }

    void eat() const {
        std::cout << "animal eat" << std::endl;
    }

    virtual ~Animal() {
        std::cout << "animal destroy" << std::endl;
    }
};


#endif //DEMOSYNTAXC_ANIMAL_H
